package cn.strive.eams.repair.controller;

import cn.strive.eams.base.response.JsonResult;
import cn.strive.eams.repair.pojo.dto.RepairSaveParam;
import cn.strive.eams.repair.service.RepairService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/v1/repair")
@Api(tags = "维修管理")
public class RepairController {
    @Autowired
    RepairService repairService;
    @PostMapping("/save")
    @ApiOperation(value="保存维修申请")
    public JsonResult saveRoomRepair(RepairSaveParam repairSaveParam) {
        log.debug("保存维修:repairSaveParam={}", repairSaveParam);
        repairService.saveRoomRepair(repairSaveParam);
        return JsonResult.ok();
    }

}
